<jsp:useBean id="mdb" class="ckstudio.db.faq" scope="page"/>
<%
ResultSet rs;
String sql;
%>
<%!	
	
	String encode(String str)
	{
    String result;
    int l;
    if(str=="")
	{
       result="";
	}
    else
    {
	    l=str.length();
		char[] chr=new char[l];
		str.getChars(0,l,chr,0);
	    result="";
		int i;
		for(i=0;i<=l-1;i++)
		{	    
        	 switch(chr[i])
			 {
	         	case '<':
	                result=result+"&lt;";
					break;
	           	case '>':
	                result=result+"&gt;";
			   		break;

              	case 10:
	                result=result+"<br>";
			  		break;
			  	case 13:
	                result=result+"<br>";
			  		break;
	           	case 34:
	                result=result+"&quot;";
			   		break;
	           	case '&':
	                result=result+"&amp;";
			   		break;
              	case ' ':
			        result=result+"&nbsp;";	
			  		break;
	               
	          	case 9:
	                result=result+"    ";
			   		break;
	           	default:
	            result=result+String.valueOf(chr[i]);
			}
	  	} 
	}
    return result;
}
%>
